package com.app.partner.control;

import com.app.partner.model.User;
import com.app.partner.model.guiji;
import com.app.partner.service.UserService;
import com.app.partner.service.guijiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("/guijiController")

public class guijiController {
   @Autowired
   guijiService guijiService;

    @RequestMapping(value="/partlistServlet",method= RequestMethod.POST)
    public List<guiji> findAll() {
        System.out.println("列出guiji");
        List<guiji> guijis = new ArrayList<>();
        try {
            guijis = guijiService.findAll();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return guijis;
    }




}
